to-string-x
ES6-compliant shim for ToString.
See: 7.1.12 ToString ( argument )
Version: 1.4.5
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750
module.exports(value)
⇒ string
⏏
The abstract operation ToString converts argument to a value of type String.
Kind: Exported function
Returns: string
- The converted value.
Throws:
TypeError
If value
is a Symbol.
Param | Type | Description |
---|
value | * | The value to convert to a string. |
Example
var $toString = require('to-string-x');
$toString();
$toString(null);
$toString('abc');
$toString(true);
$toString(Symbol('foo'));
$toString(Symbol.iterator);
$toString(Object(Symbol.iterator));
$toString(Object.create(null));